Skip to content

fix: preserve barrels after consumer write failures - #6

Open
everton-dgn wants to merge 1 commit into
webpro-nl:mainfrom
everton-dgn:fix/preserve-barrels-after-write-failure
Open

everton-dgn wants to merge 1 commit into
webpro-nl:mainfrom
everton-dgn:fix/preserve-barrels-after-write-failure

Conversation

@everton-dgn

Copy link
Copy Markdown

During default barrel discovery, when writing a rewritten consumer fails, its original import stays on disk. The tracker marks that consumer as rewritten before the write, so cleanup can delete the barrel it still needs.

Move that tracking step after rendering and writing succeed. The regression injects a write failure into a temporary project and verifies that the barrel survives, including when another consumer was rewritten successfully. Dry-run and check mode retain their existing predictions.

All 186 tests, build, lint, formatting and installed-check passed on Node 24. The failure is injected at the filesystem call; the test does not depend on platform-specific file permissions.

During default barrel discovery, when writing a rewritten consumer fails, its original import stays on disk. The tracker marks that consumer as rewritten before the write, so cleanup can delete the barrel it still needs.

Move that tracking step after rendering and writing succeed. The regression injects a write failure into a temporary project and verifies that the barrel survives, including when another consumer was rewritten successfully. Dry-run and check mode retain their existing predictions.

All 186 tests, build, lint, formatting and installed-check passed on Node 24. The failure is injected at the filesystem call; the test does not depend on platform-specific file permissions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant